package pers.lt.hibernatebeans;

import javax.persistence.*;

/**
 * Created by 18621 on 2016/8/16.
 */

@Entity(name = "ATTACH_INFO")
public class AttachInfoEntity {
    private String id;
    private String attachName;
    private String attachUrl;
    private String projectId;
    private String fileLx;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "ATTACH_NAME")
    public String getAttachName() {
        return attachName;
    }

    public void setAttachName(String attachName) {
        this.attachName = attachName;
    }

    @Basic
    @Column(name = "ATTACH_URL")
    public String getAttachUrl() {
        return attachUrl;
    }

    public void setAttachUrl(String attachUrl) {
        this.attachUrl = attachUrl;
    }

    @Basic
    @Column(name = "PROJECT_ID")
    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    @Basic
    @Column(name = "FILE_LX")
    public String getFileLx() {
        return fileLx;
    }

    public void setFileLx(String fileLx) {
        this.fileLx = fileLx;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AttachInfoEntity that = (AttachInfoEntity) o;

        if (attachName != null ? !attachName.equals(that.attachName) : that.attachName != null) return false;
        if (attachUrl != null ? !attachUrl.equals(that.attachUrl) : that.attachUrl != null) return false;
        if (fileLx != null ? !fileLx.equals(that.fileLx) : that.fileLx != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (projectId != null ? !projectId.equals(that.projectId) : that.projectId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (attachName != null ? attachName.hashCode() : 0);
        result = 31 * result + (attachUrl != null ? attachUrl.hashCode() : 0);
        result = 31 * result + (projectId != null ? projectId.hashCode() : 0);
        result = 31 * result + (fileLx != null ? fileLx.hashCode() : 0);
        return result;
    }
}
